package com.zhx.demo.reposirory;

import com.zhx.demo.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

/**
 * 用户Dao
 *
 * @author zhx
 * @create 2017-11-08 14:21
 **/
@Repository
@Transactional
public interface UserRepository extends JpaRepository<User,Long> {

    User findByUsername(String username);
    User findById(Long id);
}
